package com.jxd.dianping.service;

import com.jxd.dianping.common.BusinessException;
import com.jxd.dianping.model.UserModel;

import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;

public interface UserService {
    /**
     * 根据Id获取用户
     * @param id
     * @return
     */
    UserModel getUser(Integer id);

    /**
     * 用户注册
     * @param registerUser
     * @return
     */
    UserModel register(UserModel registerUser) throws BusinessException, UnsupportedEncodingException, NoSuchAlgorithmException;

    /**
     * 用户登录
     * @param loginUser
     * @return
     */
    UserModel login(UserModel loginUser) throws BusinessException, UnsupportedEncodingException, NoSuchAlgorithmException;

    /**
     * 统计用户数量
     * @return
     */
    Integer countAllUser();
}
